document.addEventListener('DOMContentLoaded', () => {
    const sidebar = document.querySelector('.sidebar'); // 适当地选择你的 sidebar
    const toggle = document.querySelector('.toggle');
  
    toggle.addEventListener('click', () => {
      sidebar.classList.toggle('close'); // 切换 close 类
    });
  });